package com.bugstack.domain.activity.service.paytake.threadTask;

import com.bugstack.domain.activity.model.entity.ActivityAccountDayEntity;
import com.bugstack.domain.activity.reopsitory.IActivityRepository;

import java.util.concurrent.Callable;

/**
 * @Author: czb
 * @Description: TODO
 * @DateTime: 2025/6/10 18:22
 **/
public class QueryActivityAccountDayTask implements Callable<ActivityAccountDayEntity> {

    private final Long activityId;
    private final String userId;
    private final String day;
    private final IActivityRepository activityRepository;

    public QueryActivityAccountDayTask(Long activityId, String userId, String day, IActivityRepository activityRepository) {
        this.activityId = activityId;
        this.userId = userId;
        this.day = day;
        this.activityRepository = activityRepository;
    }

    @Override
    public ActivityAccountDayEntity call() throws Exception {
        return activityRepository.queryActivityAccountDayByUserId(userId, activityId, day);
    }
}
